<%@include file="header_general.jsp"%>

<div class="mainbar">


    <%
        Utilizador ut = new Utilizador();
        Utilizador res_ut = new Utilizador();

        String email = session.getAttribute("email").toString();

        res_ut = ut.SelectUser(email);

    %>

    <div class='article'>
        <h2><span>Personal data</span></h2>
        <br />
        <form id="form_altera_dados" action="/TheHive/profile/Receive_data_changed.jsp" enctype="multipart/form-data" method="post"> 

            <div><label>Name</label> <input type="text" name="Name" id="Name" value="<%=res_ut.getNome()%>" /></div>
            <div><label>Email:</label> <input type="text" name="Email" id="Email" value="<%=res_ut.getEmail()%>" /></div>
            <div><label>Birthday:</label> <input type="text" name="Birthday" id="Birthday" value="<%=res_ut.getDataNascimento()%>" /></div>
            <div><label>Sex:</label> <input type="text" name="Sex" id="Sex" value="<%=res_ut.getSexo()%>" /></div>
            <div><label>Civil state:</label> <input type="text" name="Civil_state" id="Civil_state" value="<%=res_ut.getEstado_Civil()%>" /></div>
            <div><label>Phone number:</label> <input type="text" name="Phone_number" id="Phone_number" value="<%=res_ut.getTelemovel()%>" /></div>
            <div><label>Country:</label> <input type="text" name="Country" id="Country" value="<%=res_ut.getPais()%>" /></div>
            <div><label>District:</label> <input type="text" name="District" id="District" value="<%=res_ut.getDistrito()%>" /></div>
            <div><label>Municipality:</label> <input type="text" name="Municipality" id="Municipality" value="<%=res_ut.getConcelho()%>" /></div>
            <div><label>Parish:</label> <input type="text" name="Parish" id="Parish" value="<%=res_ut.getFreguesia()%>" /></div>
        <input type="hidden" name="emailuser" id="emailuser" value="<%=res_ut.getEmail()%>" /></div>

    <input type="hidden" name="MAX_FILE_SIZE" value="500" />
    <div><label>Photo:</label><input type="file" name="photo" id="photo"/></div>
    <br />
    <div><input type="submit" id="submit" class="botao_alterar" value="Change data"/></div>      

</form>

</div>
</div>


<%@include file="sidebar_general.jsp"%>